package com.wsc.personalblog.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.util.Date;

@ApiModel(value = "评论消息类")
public class Comment {
    @ApiModelProperty("评论id")
    private Integer id;
    @ApiModelProperty("评论消息")
    private String msg;
    @ApiModelProperty("用户id")
    private Integer userId;
    @ApiModelProperty("文章id")
    private Integer articleId;
    @ApiModelProperty("父级评论id")
    private Integer superId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("评论发布时间")
    private LocalDateTime pubDate;
    @ApiModelProperty("评论图片")
    private String photoFile;

    public void setPhotoFile(String photoFile) {
        this.photoFile = photoFile;
    }

    public String getPhotoFile() {
        return photoFile;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg == null ? null : msg.trim();
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Integer getSuperId() {
        return superId;
    }

    public void setSuperId(Integer superId) {
        this.superId = superId;
    }

    public LocalDateTime getPubDate() {
        return pubDate;
    }

    public void setPubDate(LocalDateTime pubDate) {
        this.pubDate = pubDate;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", msg='" + msg + '\'' +
                ", userId=" + userId +
                ", articleId=" + articleId +
                ", superId=" + superId +
                ", pubDate=" + pubDate +
                ", photoFile=" + photoFile +
                '}';
    }
}